﻿@model GKS.WtcrMvc.Models.Contact

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

<div>
    <div class="instance-data">
        <h4>Contact</h4>
	    <hr />
        <dl class="dl-horizontal">
            <dt>
                @Html.DisplayNameFor(model => model.FullName)
            </dt>

            <dd>
                @Html.DisplayFor(model => model.FullName)
            </dd>

            <dt>
                @Html.DisplayNameFor(model => model.CreatedIn)
            </dt>

            <dd>
                @Html.DisplayFor(model => model.CreatedIn)
            </dd>

            <dt>
                @Html.DisplayNameFor(model => model.LastUpdate)
            </dt>

            <dd>
                @Html.DisplayFor(model => model.LastUpdate)
            </dd>

        </dl>
    </div>

    <div class="instance-relations">
        <div class="relation-section">
            <div class="related-instance-name">
                <h1>Companies</h1>
            </div>

            <div class="related-instances">
                <table class="table">
                    <tr>
                        <th>
                            @*@Html.DisplayNameFor(model => model.Contact.FullName)*@
                            VAT Code
                        </th>
                        @*<th>
                            @Html.DisplayNameFor(model => model.VAT)
                        </th>*@
                        <th>
                            Created In
                        </th>
                        <th>
                            Last Update
                        </th>
                        @*<th></th>*@
                    </tr>

                @foreach (var item in Model.Companies) {
                    <tr>
                        <td>
                            @Html.DisplayFor(modelItem => item.VAT)
                        </td>
                        @*<td>
                            @Html.DisplayFor(modelItem => item.VAT)
                        </td>*@
                        <td>
                            @Html.DisplayFor(modelItem => item.CreatedIn)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.LastUpdate)
                        </td>
                        @*<td>
                            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
                            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
                            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
                        </td>*@
                    </tr>
                }
                </table>
            </div>
        </div>
    </div>
</div>
<p>
    @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) |
    @Html.ActionLink("Back to List", "Index")
</p>
